package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-06-21
 * Time: 15:07
 */
class MyValue{
   /* public int val;
}
public class Test {
    public static void swap2(MyValue myValue1, MyValue myValue2){
        int tmp = myValue1.val;
        myValue1.val = myValue2.val;
        myValue2.val = tmp;
    }
    public static void main(String[] args) {
        MyValue myValue1 = new MyValue();
        MyValue myValue2 = new MyValue();
        swap2(myValue1,myValue2);
        System.out.println(myValue1 + " " );
    }*/
}


